[id^='frmb-'][id$='-form-wrap'] {
  .empty {
    .frmb {
      border: 3px dashed $grey-light;
      margin-right: 5px;
      background-color: rgba(255, 255, 255, 0.25);
    }
  }

  .stage-wrap {
    position: relative;
    float: left;
    width: 74%;

    &.pull-right {
      .frmb {
        margin: 0 0 0 6px;
      }
    }

    @include breakpoint('phone-lrg') {
      width: calc(100% - 64px);
    }


    .action-links {
      width: calc( 100% - 141px);
      display: none;
      float: right;
      overflow: hidden;
      text-align: right;
    }

    &.empty {
      &:after {
        content: attr(data-content);
        position: absolute;
        text-align: center;
        top: 50%;
        left: 0;
        width: 100%;
        margin-top: -1em;
      }
    }

    .action-links .active {
      font-weight: 700;
      color: $black;
    }
  }

  .frmb {
    list-style-type: none;
    min-height: 200px;
    margin: 0 6px 0 0;
    padding: 0;
    transition: background-color 500ms ease-in-out;

    &.removing {
      overflow: hidden;
    }

    li {
      position: relative;
      padding: 6px;
      clear: both;
      margin-left: 0;
      margin-bottom: 3px;
      background-color: $white;
      transition: background-color 250ms ease-in-out, margin-top 400ms;

      &:hover {
        .field-actions {
          opacity: 1;
        }
      }

      &.hidden-field {
        background-color: rgba(255, 255, 255, 0.6);
      }

      &:first-child {
        border-top-right-radius: 5px;
        border-top-left-radius: 5px;

        .field-actions {
          .btn:last-child {
            border-radius: 0 5px 0 0;
          }
        }
      }

      &:last-child {
        border-bottom-right-radius: 5px;
        border-bottom-left-radius: 5px;
      }

      &:hover {
        border-color: #66afe9;
        outline: 0;
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);

        li {
          :hover {
            background: #fefefe;
          }
        }
      }

      &.no-fields label {
        font-weight: 400;
      }

      @keyframes PLACEHOLDER {
        0% {
          height: 0;
        }

        100% {
          height: 15px;
        }
      }

      &.frmb-placeholder,
      &.ui-state-highlight {
        height: 0;
        padding: 0;
        background: radial-gradient(ellipse at center, rgba(84, 84, 84, 1) 0%, rgba(0, 0, 0, 0) 75%);
        border: 0 none;
        clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
        visibility: visible;
        overflow: hidden;
        margin-bottom: 3px;
        animation: PLACEHOLDER 250ms forwards;
      }

      &.moving,
      &.ui-sortable-helper {
        transition: box-shadow 500ms ease-in-out;
        box-shadow: 2px 2px 6px 0 $grey;
        border: 1px solid $white;
        border-radius: 5px;
      }

      &.disabled {
        z-index: 1;

        [type=checkbox] {
          float: left;
          margin-right: 10px;
        }

        h2 {
          border-bottom: 0 none;
        }

        label {
          font-size: 12px;
          font-weight: 400;
          color: $grey;
        }

        .prev-holder {
          cursor: default;
          line-height: 28px;
          padding-left: 5px;
        }
      }

      .close-field {
        position: absolute;
        color: $grey;
        left: 50%;
        bottom: 6px;
        background: #fff;
        border-top: 1px solid #d7d7d7;
        border-left: 1px solid #d7d7d7;
        border-right: 1px solid #D7D7D7;
        transform: translateX(-50%);
        padding: 0 5px;
        border-top-right-radius: 3px;
        border-top-left-radius: 3px;
        cursor: pointer;
        transition: background-color 250ms ease-in-out;

        &:hover {
          text-decoration: none;
        }
      }

      &.button-field,
      &.header-field,
      &.paragraph-field {
        h1,
        h2,
        h3,
        p,
        canvas,
        output,
        address,
        blockquote,
        .prev-holder {
          margin: 0;
        }

        .field-label {
          display: none;
        }

        &.editing {
          .field-label {
            display: block;
          }
        }
      }

      &.paragraph-field {
        .fld-label {
          min-height: 150px;
        }
      }
    }

    li.deleting,
    li.delete:hover,
    li:hover li.delete:hover {
      background-color: #fdd;

      .close-field {
        background-color: #fdd;
      }
    }

    li.deleting {
      z-index: 20;
      pointer-events: none;
    }

    &.disabled {
      padding: 0 5px;

      :hover {
        border-color: transparent;
      }

      .form-element {
        float: none;
        margin-bottom: 10px;
        overflow: visible;
        padding: 5px 0;
        position: relative;
      }
    }

    .frm-holder {
      display: none;
    }

    .tooltip {
      left: 20px;
    }

    .prev-holder {
      display: block;
      margin-top: 12px;

      .form-group > label:not([class='fb-checkbox-label']) {
        display: none;
      }

      input[type='color'] {
        width: 60px;
        padding: 2px;
        display: inline-block;
      }

      input[type='date'] {
        width: auto;
      }

      select[multiple] {
        height: auto;
      }

      label {
        font-weight: normal;
      }

      input[type='number'] {
        width: auto;
      }

      input[type='checkbox'],
      input[type='radio'] {
        margin-right: 5px;
      }

      input[type='color'] {
        width: 60px;
        padding: 2px;
        display: inline-block;
      }
    }

    .required-asterisk {
      display: none;
    }

    .field-label,
    .legend {
      color: $grey;
      margin-bottom: 5px;
    }

    .disabled .field-label {
      display: block;
    }

    .field-actions {
      position: absolute;
      top: 0;
      right: 0;
      opacity: 0;

      a {
        &:hover {
          text-decoration: none;
          color: #000;
        }
      }

      .btn {
        display: inline-block;
        width: 32px;
        height: 32px;
        padding: 0;
        border-radius: 0;
        border-color: $grey-light-30;
        background-color: rgba(255, 255, 255, 0.75);
        color: $grey-light-30;
        line-height: 32px;
        font-size: 16px;
        border-width: 0 0 1px 1px;

        &:first-child {
          border-bottom-left-radius: 5px;
        }
      }

      .toggle-form {
        font-size: .85em;

        &:hover {
          background-color: $edit;
          color: $white;
        }
      }

      .copy-button {
        &:hover {
          background-color: $copy;
          color: $white;
        }
      }

      .del-button {
        &:hover {
          background-color: $remove;
          color: $white;
        }
      }
    }

    .option-actions {
      text-align: right;
      margin-top: 10px;
      width: 100%;
      margin-left: 2%;

      button,
      a {
        background: #fff;
        padding: 5px 10px;
        border: 1px solid $grey-light-30;
        font-size: 14px;
        border-radius: 5px;
        cursor: default;
      }
    }

    .sortable-options-wrap {
      width: 81.33333333%;
      display: inline-block;

      label {
        font-weight: normal;
      }

      @include breakpoint('phone-lrg') {
        display: block;
        width: 100%;
      }
    }

    ol.sortable-options {
      display: inline-block;
      width: 100%;
      margin-left: 2%;
      background: $grey-light-30;
      margin-bottom: 0;
      border-radius: 5px;
      list-style: none;
      padding: 0;

      li {
        cursor: move;
        margin: 1px;

        &:nth-child(1) .remove,
        &:nth-child(2) .remove {
          display: none;
        }

        .remove {
          position: absolute;
          opacity: 1;
          right: 14px;
          height: 17px;
          width: 17px;
          line-height: 17px;
          text-align: center;
          top: 14px;
          font-size: 18px;
          padding: 0;
          color: $error;

          &:hover {
            background-color: $error;
            text-decoration: none;
            color: $white;
          }
        }
      }

      input[type=checkbox],
      input[type=radio] {
        margin: 0;
        width: 5%;
      }

      input[type='text'] {
        width: calc(44.5% - 17px);
        margin: 0 1%;
        float: none;
      }
    }

    .form-field {
      .form-group {
        width: 100%;
        clear: left;
        float: none;
      }
    }

    .form-elements .field-options .add-area .add {
      clear: both;
    }

    .col-md-6,
    .col-md-8 {
      .form-elements {
        width: 100%;
      }
    }

    .field-options .add-area .add {
      clear: both;
    }

    .form-elements {
      padding: 10px 5px;
      background: #f7f7f7;
      border-radius: 3px;
      margin: 12px 0 0;
      border: 1px solid #d7d7d7;

      .input-wrap {
        width: 81.33333333%;
        margin-left: 2%;
        float: left;

        > input[type=checkbox] {
          margin-top: 8px;
        }
      }

      .btn-group {
        margin-left: 2%;
      }

      input[type='text'],
      input[type='number'],
      input[type='date'],
      input[type='color'],
      textarea,
      select {
        transition: background 250ms ease-in-out;
        padding: 6px 12px;
        border: 1px solid #AFAFAB;
        background-color: $white;
      }

      @include breakpoint('phone-lrg') {
        .input-wrap {
          width: 100%;
          margin-left: 0;
          float: none;
        }
      }


      input[type='number'] {
        width: auto;
      }

      .btn-group {
        margin-left: 2%;
      }

      .false-label,
      label {
        .col-md-6 &,
        .col-md-8 & {
          display: block;
        }

        &:first-child {
          width: 16.66666667%;
          padding-top: 7px;
          margin-bottom: 0;
          text-align: right;
          font-weight: 700;
          float: left;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          text-transform: capitalize;

          @include breakpoint('phone-lrg') {
            display: block;
            width: auto;
            float: none;
            text-align: left;

            &.empty-label {
              display: none;
            }
          }
        }

        &.multiple,
        &.required-label,
        &.toggle-label,
        &.roles-label,
        &.other-label {
          text-align: left;
          float: none;
          margin-bottom: -3px;
          font-weight: 400;
          width: calc(81.3333% - 23px);
        }
      }
    }
  }

  &.fb-mobile {
    .field-actions {
      opacity: 1;
    }
  }

  /*   ------------   TOOLTIP   ------------   */

  *[tooltip] {
    position: relative;
  }

  *[tooltip]:hover:after {
    background: darken($grey, 25%);
    background: rgba(0, 0, 0, 0.9);
    border-radius: 5px 5px 5px 0;
    bottom: 23px;
    color: $white;
    content: attr(tooltip);
    padding: 10px 5px;
    position: absolute;
    z-index: 98;
    left: 2px;
    width: 230px;
    text-shadow: none;
    font-size: 12px;
    line-height: 1.5em;
    cursor: default;
  }

  *[tooltip]:hover:before {
    border: solid;
    border-color: #222 transparent;
    border-width: 6px 6px 0 6px;
    bottom: 17px;
    content: '';
    left: 2px;
    position: absolute;
    z-index: 99;
    cursor: default;
  }

  .tooltip-element {
    display: inline;
    visibility: visible;
    color: $white;
    background: $black;
    width: 16px;
    height: 16px;
    border-radius: 8px;
    display: inline-block;
    text-align: center;
    line-height: 16px;
    margin: 0 5px;
    font-size: 12px;
    cursor: default;
  }
}
